﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.IO;
using System.Windows.Forms;
using ModelGymTauro;

namespace ViewGymTauro
{
    public partial class InfoPersonal : Form
    {
        public InfoPersonal(Empleado e)
        {
            InitializeComponent();
           
            this.txtName.Text = e.Nombre;
            this.txtCode.Text = e.Id.ToString();
            this.txtCorreo.Text = e.Correo;
            this.txtDni.Text = e.Dni.ToString();
            this.txtLastname.Text = e.Apellido;
            this.txtEmployee.Text = e.TipoEmpleado;
            this.txtTelef.Text = e.Telefono;
            this.txtDirecc.Text = e.Direccion;
            this.txtNac.Text = e.FechaNacimiento.ToShortDateString();
            MemoryStream mem = new MemoryStream(e.Foto);
            
            this.pictureBox1.Image = Image.FromStream(mem);
            
            
        }

       
    }
}
